//封装网络请求
import axios from '../axios/request'

//登录账户
export const login = (param) => {
  return axios.post('/user/login', param)
}

//修改用户信息
export const updateUserInfo = (param) => {
  return axios.put('/user', param)
}

//新增商品数据
export const addShopInfo = (param) => {
  return axios.post('/shop', param)
}

//商品更新
export const updateShopInfo = (param) => {
  return axios.put('/shop', param)
}

//商品下单
export const buyShop = (param) => {
  return axios.put('/shop/buy?id='+param)
}


//商品查询
export const selectShopInfo = (query) => {
  return axios.get('/shop/page'+query)
}

//商品删除
export const delShopInfo = (param) => {
  return axios.delete('/shop?idList='+param)
}



